import java.util.Scanner;

public class Four {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while (scan.hasNextDouble()) {
			double a,b=0;
			a=scan.nextDouble();
			if (a < 0) {
				System.out.println("NaN");
			}
			else{
				while((a-Math.pow(b, 2))>=0.0001&&Math.pow(b, 2)<a){
					b=b+0.0001;
				}
				System.out.printf("%.6f\n", b);
			}
		}
		scan.close();
	}
}